package uo.ri.peristence;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.List;
import java.util.Map;

public interface AveriaGateway {
	
public void setConnection(Connection con);
	
	public Map<String,Object> findById(Long id);
	
	public List<Map<String,Object>> findAll();
	
	public Long save(Map<String,Object> invoice);
	
	public void delete(Long id);
	
	public void update(Map<String,Object> invoice);
	
	public String verificarEstadoAveria(Long id) throws SQLException;
	
	public void cambiarEstadoAveria(Long id,String status) throws SQLException;
	
	public void vincularAveriaFactura(Long idAveria,Long idFactura) throws SQLException;
	
	public Double consultaImporteManoObra(Long idAveria) throws SQLException;
	
	public double consultaImporteRepuestos(Long idAveria) throws SQLException;
	
	public void actualizarImporteAveria(Long idAveria, double totalAveria) throws SQLException;

}
